<?php 
	//tao form
	echo $this->Form->create('Trainee', array('action'=>'savestep2'));
	echo $javascript->link(array('views/trainees/step2'));
?>
  			<H1>Step 2: Select Appoinment</H1>
   		  <div class="step"><?php echo $html->image('step2.jpg', array('width'=>728, 'height'=>31));	//ThanhBC: load images by CakePHP?></div>
<div class="leftbox">
    	<h1>TEST CENTER</h1>
    		<div class="name">I want have test in: *</div>
				<?php echo $this->Form->input('testwhere', array('type'=>'select', 'options'=>$venues, 'label'=> false, 'id'=>'ddllocation', 'class'=>'lst_choice', 'empty'=>'Click one...'));?>
              
   	  </div><!--endleftbox-->
     		
<div class="rightbox">
          <h1>TEST TIME</h1>
  		   <div class="name">Time to test</div>		   
		   <div id="errormsg">
		   <?php 
				// $errormsg = $this->Session->read('st2_errormsg');
				if(isset($st2_errormsg))
				{
					echo $st2_errormsg;
				}	
		   ?>
		   </div>
			  <!-- end Datetimepicker-->
			<?php
			$option1 = array();
			$option2 = array();
			$option3 = array();
			
			for($i = 1; $i < 32; $i++)
				$option1[$i] = $i;
				
			for ($j = 1; $j < 13; $j++)
				$option2[$j] = $j;
				
			for ($k = 2012; $k < 2100; $k++)
				$option3[$k] = $k;
			?>
			  
           <div class="col16">
                  <div class="name">Day: *</div>
				  <? echo $this->Form->input('dayTest', array('type'=>'select', 'options' => $option1,'class'=>'lst_choice16', 'label' => false, 'empty' => 'Click one...', 'id'=>'ddldate', 'selected'=>$this->Session->read('dayTest'))); ?>           
                           
          </div>
              <div class="col162">
                  <div class="name">Month: *</div>
				  <? echo $this->Form->input('monthTest', array('type'=>'select', 'options' => $option2,'class'=>'lst_choice16', 'label' => false, 'empty' => 'Click one...', 'id'=>'ddlmonth', 'selected'=>$this->Session->read('monthTest'))); ?>           
                        
              </div>
              <div class="col162">
                  <div class="name">Year: *</div>
				  <? echo $this->Form->input('yearTest', array('type'=>'select', 'options' => $option3,'class'=>'lst_choice16', 'label' => false, 'empty' => 'Click one...', 'id'=>'ddlyear', 'selected'=>$this->Session->read('yearTest'))); ?>         
                       
              </div>
			 
<div id="clearone"></div>
              <div class="name">Time slot: *</div>
			   <? //echo $this->Form->input('duration', array('type'=>'select', 'options' => $timeslots,'class'=>'lst_choice', 'label' => false, 'empty' => 'Select one...', 'selected'=>$this->Session->read('duration'))); ?>         
			   <? echo $this->Form->input('duration', array('type'=>'select', 'class'=>'lst_choice', 'label' => false, 'empty' => 'Select one...', 'id'=>'ddltimeslot', 'selected'=>$this->Session->read('duration'))); ?>         
              
      	</div><!--endrightbox-->
        
   	<div id="clearone"></div>
    I have Voucher: <INPUT NAME="switchBox" TYPE="checkbox" id="chk1" onClick="toggleLayer('novoucher')"> 
    No 
    <input type="checkbox" name="switchBox2" id="chk2" onclick="toggleLayer('voucher')" />
    Yes
    <div id="voucher" style="display:none;" >
   	  <div class="leftbox">
    		<div class="name">Voucher No./ Promo code/ anydiscount code: *</div>
              <? echo $this->Form->input('voucher_no', array('type'=>'text', 'class'=>'txt_input', 'value'=>$this->Session->read('v_no'))); ?>           
   	  </div><!--endleftbox-->
     		
<div class="rightbox">
  		   
              <div class="name">Voucher expiry date: *</div>
           <div id="errormsg1"></div>
           <div class="col16">
                  <div class="name">Day: *</div>
				  <? echo $this->Form->input('dayExp', array('type'=>'select', 'options' => $option1,'class'=>'lst_choice16', 'label' => false, 'empty' => 'Click one...', 'id'=>'ddldate1', 'selected'=>$this->Session->read('dayExp'))); ?>           
                           
          </div>
              <div class="col162">
                  <div class="name">Month: *</div>
				  <? echo $this->Form->input('monthExp', array('type'=>'select', 'options' => $option2,'class'=>'lst_choice16', 'label' => false, 'empty' => 'Click one...', 'id'=>'ddlmonth1', 'selected'=>$this->Session->read('monthExp'))); ?>           
                        
              </div>
              <div class="col162">
                  <div class="name">Year: *</div>
				  <? echo $this->Form->input('yearExp', array('type'=>'select', 'options' => $option3,'class'=>'lst_choice16', 'label' => false, 'empty' => 'Click one...', 'id'=>'ddlyear1', 'selected'=>$this->Session->read('yearExp'))); ?>         
                       
              </div>
      	</div><!--endrightbox-->
        
   	<div id="clearone"></div></div><!--endvoucher-->
    <div id="novoucher" style="display:none;" ></div>
		<div class="nav_btn">
            <a href="#" class="rightbtn"><? echo $this->Form->end('Step 3: Review');?></a>
            <a href="<?php echo $html->url('/trainees/step1');?>" class="leftnav">Step 1: Select Program</a>
            <div id="clearone"></div>
        </div>
    
